package com.maychat.pojo;

import com.maychat.enums.UserContactApplyStatus;
import com.maychat.enums.UserContactStatus;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserContactApply {
    protected Integer applyId;
    protected String applyUserId;
    protected String receiveUserId;
    protected Integer contactType;
    protected String contactId;
    protected Long lastApplyTime;
    protected Integer status;
    protected String statusDesc;
    protected String applyInfo;

    public UserContactApply(Integer applyId, String applyUserId, String receiveUserId, Integer contactType, String contactId, Long lastApplyTime, Integer status, String applyInfo) {
        this.applyId = applyId;
        this.applyUserId = applyUserId;
        this.receiveUserId = receiveUserId;
        this.contactType = contactType;
        this.contactId = contactId;
        this.lastApplyTime = lastApplyTime;
        this.status = status;
        this.applyInfo = applyInfo;
    }

    public String getStatusDesc() {
        return UserContactApplyStatus.getByOrdinal(this.status).getDesc();
    }
}
